<%@ page import="ta.pojo.Blog" %>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html>
<html lang="en">
	<head>		
		<meta charset="utf-8" />
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0" />
		<base href="${basepath}">
		<title>后台首页</title>

		<!-- bootstrap & fontawesome -->
		<link rel="stylesheet" href="assets/css/bootstrap.min.css" />
		<link rel="stylesheet" href="assets/font-awesome/4.5.0/css/font-awesome.min.css" />

		<!-- page specific plugin styles -->
		<!-- ace styles -->
		<link rel="stylesheet" href="assets/css/ace.min.css" class="ace-main-stylesheet" id="main-ace-style" />

		<!--[if lte IE 9]>
			<link rel="stylesheet" href="assets/css/ace-part2.min.css" class="ace-main-stylesheet" />
		<![endif]-->
		<link rel="stylesheet" href="assets/css/ace-skins.min.css" />
		<link rel="stylesheet" href="assets/css/ace-rtl.min.css" />

		<!--[if lte IE 9]>
		  <link rel="stylesheet" href="assets/css/ace-ie.min.css" />
		<![endif]-->

		<!-- inline styles related to this page -->

		<!-- ace settings handler -->
		<script src="assets/js/ace-extra.min.js"></script>

		<!-- HTML5shiv and Respond.js for IE8 to support HTML5 elements and media queries -->

		<!--[if lte IE 8]>
		<script src="assets/js/html5shiv.min.js"></script>
		<script src="assets/js/respond.min.js"></script>
		<![endif]-->
	</head>

	<body class="no-skin">
	 
	   <jsp:include page="/templetes/header.jsp"></jsp:include>
	    <div class="main-container ace-save-state" id="main-container">
			<script type="text/javascript">
				try{ace.settings.loadState('main-container')}catch(e){}
			</script>
		<jsp:include page="/templetes/menu.jsp"></jsp:include>
			
           <div class="main-content">
				<div class="main-content-inner">
					<div class="breadcrumbs ace-save-state" id="breadcrumbs">
						<ul class="breadcrumb">
							<li>
								<i class="ace-icon fa fa-home home-icon"></i>
								<a href="#">Home</a>
							</li>
						</ul><!-- /.breadcrumb -->

						<div class="nav-search" id="nav-search">
							<form class="form-search">
								<span class="input-icon">
									<input type="text" placeholder="Search ..." class="nav-search-input" id="nav-search-input" autocomplete="off" />
									<i class="ace-icon fa fa-search nav-search-icon"></i>
								</span>
							</form>
						</div><!-- /.nav-search -->
					</div>

					<div class="page-content">
						<div class="row">
							<div class="col col-md-5">
								<!-- PAGE CONTENT BEGINS -->
							                               
								<form id="f" action="admin/BlogServlet?type=edit" method="post">
								<fieldset>
							    <input type="hidden" value="${blog.blogid}" name="blogid">
								<label class="block clearfix"> <span
									class="block input-icon input-icon-right"> <input
										type="text" class="form-control" name="title"
								value="${blog.title}"	id="title"	placeholder="标题" /> <i class="ace-icon fa fa-user"></i>
								</span>
								</label> 
								<label class="block clearfix"> <span
									class="block input-icon input-icon-right"> 
									<select name="category"  class="chosen-select form-control">
									   <c:forEach var="cat" items="${list }">
									      <c:choose>
									          <c:when test="${cat.cname eq blog.category}">
									            <option selected>${cat.cname}</option>
									          </c:when>
									          <c:otherwise>
									            <option >${cat.cname}</option>
									          </c:otherwise>
									      </c:choose>									     
									   </c:forEach>									  
									</select>		
								</span>
								</label> 
								<label class="block clearfix"> <span
									class="block input-icon input-icon-right"> 
									<textarea  name="content"  id="content">
									${blog.content}
									</textarea>									
								</span>
								</label>
								<label class="block clearfix"> <span
									class="block input-icon input-icon-right">
									<input value="${blog.pubtime}"	type="text" class="form-control" placeholder="发布时间"
									id="pubtime"	name="pubtime" /> <i class="ace-icon fa fa-calendar"></i>
								</span>
								</label>
								<label class="block clearfix"> <span
									class="block input-icon input-icon-right">
									<input
										type="submit" class="form-control btn-success"
										value="修改"  />
								</span>
								</label>
							</fieldset>
						</form>
								<!-- PAGE CONTENT ENDS -->
							</div><!-- /.col -->
						</div><!-- /.row -->
					</div><!-- /.page-content -->
				</div>
			</div><!-- /.main-content -->

			<div class="footer">
				<div class="footer-inner">
					<div class="footer-content">
						<span class="bigger-120">
							<span class="blue bolder">Ace</span>
							Application &copy; 2013-2014
						</span>

						&nbsp; &nbsp;
						<span class="action-buttons">
							<a href="#">
								<i class="ace-icon fa fa-twitter-square light-blue bigger-150"></i>
							</a>

							<a href="#">
								<i class="ace-icon fa fa-facebook-square text-primary bigger-150"></i>
							</a>

							<a href="#">
								<i class="ace-icon fa fa-rss-square orange bigger-150"></i>
							</a>
						</span>
					</div>
				</div>
			</div>

			<a href="#" id="btn-scroll-up" class="btn-scroll-up btn btn-sm btn-inverse">
				<i class="ace-icon fa fa-angle-double-up icon-only bigger-110"></i>
			</a>
		</div><!-- /.main-container -->

		<!-- basic scripts -->

		<!--[if !IE]> -->
		<script src="assets/js/jquery-2.1.4.min.js"></script>

		<!-- <![endif]-->

		<!--[if IE]>
<script src="assets/js/jquery-1.11.3.min.js"></script>
<![endif]-->
		<script type="text/javascript">
			if('ontouchstart' in document.documentElement) document.write("<script src='assets/js/jquery.mobile.custom.min.js'>"+"<"+"/script>");
		</script>
		<script src="assets/js/bootstrap.min.js"></script>

		<!-- page specific plugin scripts -->

		<!-- ace scripts -->
		<script src="assets/js/ace-elements.min.js"></script>
		<script src="assets/js/ace.min.js"></script>
		<script src="assets/laydate/laydate.js"></script>
		<script type="text/javascript" src="assets/ckeditor/ckeditor.js"></script>
		
		<script type="text/javascript">
		     laydate.render({
		    	 elem: '#pubtime'
		    	 , type: 'datetime'
		    	 ,theme: 'molv'
		     });
		     
		     CKEDITOR.replace('content',{
         		filebrowserUploadUrl : 'ckupload?Type=File',
         	    filebrowserImageUploadUrl : 'ckupload?Type=Image',
         	    filebrowserFlashUploadUrl : 'ckupload?Type=Flash',
         	    width:754,
         	    height:400
         	});
		</script>

		<!-- inline scripts related to this page -->
	</body>
</html>
